package com.forum.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.util.Date;

/**
 * <p>
 * 课程订单
 * </p>
 *
 * @author 张继成
 * @since 2023-12-31
 */
@Data
@TableName("courseorder")
public class CourseorderEntity implements Serializable {

    //无参方法
    public CourseorderEntity(){

    }
    public CourseorderEntity(T t){
        try {
            BeanUtils.copyProperties(this,t);
        }catch (IllegalAccessException | InvocationTargetException e){
            e.printStackTrace();
        }
    }
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Long id;

    /**
     * 创建时间
     */
    private Date addtime;

    /**
     * 订单编号
     */
    @TableField("OrderNo")
    private String dingdanbianhao;

    /**
     * 课程名称
     */
    @TableField("CourseName")
    private String kechengmingcheng;

    /**
     * 学科
     */
    @TableField("Discipline")
    private String xueke;

    /**
     * 价格
     */
    @TableField("price")
    private String jiage;

    /**
     * 下单时间
     */
    @TableField("PlaceOrderTime")
    @JsonFormat(locale = "zh",timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat
    private Date xiadanshijian;

    /**
     * 学生账号
     */
    @TableField("StudentNo")
    private String studentaccount;

    /**
     * 学生账号
     */
    @TableField("StudentName")
    private Long studentname;

    /**
     * 是否支付
     */
    private String ispay;

}
